package com.mspbots.core.ticketai.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mspbots.core.DefaultBaseService;
import com.mspbots.core.ticketai.TicketController;
import com.mspbots.core.ticketai.model.BotTicketCache;
import com.mspbots.core.ticketai.model.Ticket;
import com.mspbots.core.ticketai.model.TicketOnly;
import com.mspbots.core.ticketai.model.TicketStatistic;

import java.util.List;

/**
 * com.mspbots.core.ticketai.TicketService
 *
 * @author Alex bob(https://github.com/vnobo)
 * @date Created by 2019/8/8
 */
public interface TicketService extends DefaultBaseService<Ticket> {

    /**
     * v
     *
     * @param page
     * @param ticket
     * @return
     */
    Page<Ticket> listForRule(Page<Ticket> page, Ticket ticket);

    Ticket selectByCwId(Ticket ticket);

    List<TicketStatistic> countEveryday(Long tenantId);

    /**
     * next ticket get list all
     *
     * @param params get params tenant
     * @return list ticket
     */
    List<Ticket> nextList(TicketController.TicketQueryParams params);

    List<TicketOnly> getTicketList(TicketController.TicketQueryParams params);

    List<Ticket> getAssignedTicketList(Long tenantId, String ticketIds);

    /**
     * delete batch tickets
     *
     * @param params delete params
     * @return result rows all
     */
    Integer deleteBatch(TicketController.TicketQueryParams params);


    Ticket findNextTicketRate(Ticket queryParams);

    Object setCache(BotTicketCache queryParams);

    Boolean removeCache(BotTicketCache queryParams);

    Object getCache(BotTicketCache queryParams);
}
